package com.workflowengine.workflowbase;

import com.workflowengine.config.WorkFlowContent;

/**
 * @Package: com.workflowengine.workflowbase
 * @ClassName: Icommad
 * @Author: h2cloud
 * @CreateTime: 2024/7/15 11:19 下午
 * @Description:
 */
public abstract class AbstractWorkFlowCommand {

	public void run(WorkFlowContent workFlowContent) {
		doBefore(workFlowContent);
		doAction(workFlowContent);
		doAfter(workFlowContent);
	}

	protected abstract void doAction(WorkFlowContent workFlowContent);

	public void doBefore(WorkFlowContent workFlowContent) {

	}

	public void doAfter(WorkFlowContent workFlowContent) {

	}

	public boolean needCreateRecord(WorkFlowContent workFlowContent) {
		return false;
	}

	public boolean needCreateTodo(WorkFlowContent workFlowContent) {
		return false;
	}
}
